<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class SceneEvent extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('scene_event',function(Blueprint $table){
            $table->id();
            $table->bigInteger('scene_id')->default(0)->comment('场景ID');
            $table->string('code')->default('')->comment('事件编码');
            $table->string('name')->default('')->comment('事件名');
            $table->integer('all_max_amount')->default(0)->comment('所有人完成次数');
            $table->integer('daily_max_amount')->default(0)->comment('每天完成多少次');
            $table->integer('month_max_amount')->default(0)->comment('每月完成多少次');
            $table->tinyInteger('is_enable')->default(0)->comment('是否启用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
